<?php
class DoBatchEditAction extends BackendAction
{
	public function execute()
	{
		$userDao = new UserDao();
		foreach ($_POST['conf'] as $attrId => $conf)
		{
			$conf['id'] = $attrId;
			if (!isset($conf['disabled']))
			{
				$conf['disabled'] = 0;
			}
			$userDao->updateUserAttrConf($conf);
		}
		$this->view->result["code"] = 200;
		$this->view->render();
	}
}
